package com.thomas.feign;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/hello")
@RestController
public class HelloController {

    @Autowired
    HelloRemote helloRemote;

    Log LOG = LogFactory.getLog(HelloController.class);
    
    @GetMapping("/{name}")
    public String index(@PathVariable("name") String name) {
    	LOG.info("== Comsumer ==");
        return helloRemote.hello(name + "!");
    }

}
